package com.example.wan1.di;

import com.example.wan1.di.ano.FragmentScope;
import com.example.wan1.view.coin.CoinFragment;
import com.example.wan1.view.coin.CoinModule;
import com.example.wan1.view.coin.CoinRankFragment;
import com.example.wan1.view.coin.CoinRankModule;
import com.example.wan1.view.collect.CollectModule;
import com.example.wan1.view.collect.PerCollectFragment;
import com.example.wan1.view.home.ArticleFragment;
import com.example.wan1.view.home.HomeFragment;
import com.example.wan1.view.home.HomeModule;
import com.example.wan1.view.home.PerProjectFragment;
import com.example.wan1.view.homenew.NewHomeFragment;
import com.example.wan1.view.homenew.NewHomeModule;
import com.example.wan1.view.mine.MineFragment;
import com.example.wan1.view.project.ProjectsFragment;
import com.example.wan1.view.project.ProjectsModule;
import com.example.wan1.view.setting.SettingDialogFragment;
import com.example.wan1.view.setting.SettingModule;
import com.example.wan1.view.square.SquareFragment;
import com.example.wan1.view.square.SquareModule;
import com.example.wan1.view.system.SystemFragment;
import com.example.wan1.view.system.SystemModule;
import com.example.wan1.view.system.knowledge.KnowledgeModule;
import com.example.wan1.view.system.knowledge.KnowledgeSystemFragment;
import com.example.wan1.view.system.knowledge.level2.PerKnowledgeFragment;
import com.example.wan1.view.system.navi.NaviFragment;
import com.example.wan1.view.system.question.QuestionFragment;
import com.example.wan1.view.system.website.WebsiteFragment;
import com.example.wan1.view.wechat.WeChatFragment;
import com.example.wan1.view.wechat.WechatFragmentModule;
import com.example.wan1.view.wechat.WxFragment;
import com.example.wan1.view.wechat.WxModule;

import dagger.Module;
import dagger.android.ContributesAndroidInjector;

/***
 * @Author: zxd
 * @CreateDate: 2020/8/26 13:13
 * @Description: 所有的碎片管理
 */
@Module
public abstract class FragmentsModule {

    //首页界面
    @FragmentScope
    @ContributesAndroidInjector(modules = HomeModule.class)
    abstract public HomeFragment contributesHomeFragment();

    //文章页面
    @FragmentScope
    @ContributesAndroidInjector(modules = HomeModule.class)
    abstract public ArticleFragment contributesArticleFragment();

    //每个项目页面或者最新项目界面
    @FragmentScope
    @ContributesAndroidInjector(modules = HomeModule.class)
    abstract public PerProjectFragment contributesPerProjectFragment();

    //项目tab
    @FragmentScope
    @ContributesAndroidInjector(modules = ProjectsModule.class)
    abstract public ProjectsFragment contributesProjectsFragment();

    //广场tab
    @FragmentScope
    @ContributesAndroidInjector(modules = {SquareModule.class})
    abstract public SquareFragment contributesSquareFragment();

    //我的tab
    @FragmentScope
    @ContributesAndroidInjector(modules = SettingModule.class)
    abstract public MineFragment contributesMineFragment();

    //知识体系tab
    @FragmentScope
    @ContributesAndroidInjector(modules = SystemModule.class)
    abstract public SystemFragment contributesSystemFragment();

    //常用网站
    @FragmentScope
    @ContributesAndroidInjector(modules = SystemModule.class)
    abstract public WebsiteFragment contributesWebsiteFragment();

    //问答
    @FragmentScope
    @ContributesAndroidInjector(modules = SystemModule.class)
    abstract public QuestionFragment contributesQuestionFragment();

    //导航
    @FragmentScope
    @ContributesAndroidInjector(modules = SystemModule.class)
    abstract public NaviFragment contributesNaviFragment();

    //知识体系
    @FragmentScope
    @ContributesAndroidInjector(modules = KnowledgeModule.class)
    abstract public KnowledgeSystemFragment contributesKnowledgeSystemFragment();

    //知识体系详情页
    @FragmentScope
    @ContributesAndroidInjector(modules = KnowledgeModule.class)
    abstract public PerKnowledgeFragment contributesPerKnowledgeFragment();

    //公众号
    @FragmentScope
    @ContributesAndroidInjector(modules = WechatFragmentModule.class)
    abstract public WeChatFragment contributesWeChatFragment();

    //收藏界面
    @FragmentScope
    @ContributesAndroidInjector(modules = CollectModule.class)
    abstract public PerCollectFragment contributesPerCollectFragment();

    //dialogfragment
    //我的积分
    @FragmentScope
    @ContributesAndroidInjector(modules = CoinModule.class)
    abstract public CoinFragment contributesCoinFragment();

    //积分排行榜
    @FragmentScope
    @ContributesAndroidInjector(modules = CoinRankModule.class)
    abstract public CoinRankFragment contributesCoinRankFragment();

    //设置界面
    @FragmentScope
    @ContributesAndroidInjector(modules = SettingModule.class)
    abstract public SettingDialogFragment contributesSettingDialogFragment();

    //公众号
    @FragmentScope
    @ContributesAndroidInjector(modules = WxModule.class)
    abstract public WxFragment contributesWxFragment();

    //最新首页
    @FragmentScope
    @ContributesAndroidInjector(modules = NewHomeModule.class)
    abstract public NewHomeFragment contributesNewHomeFragment();
}
